package core.address.model.country;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import core.address.model.continent.Continent;

@Entity
@Table(name="country")
public class Country implements Serializable
{
	private static final long serialVersionUID = -8767337896773261247L;
	private Long uuid;
	private String countryName ;
	private Continent continent ;
	private String abbreviation ;
	
	@Id
	@GeneratedValue
	@Column(name="uuid")
	public Long getUuid()
	{
		return uuid ;
	}
	@Column(name="countryname")
	public String getCountryName() 
	{
		return countryName;
	}
	public void setUuid(Long uuid)
	{
		this.uuid = uuid;
	}
	public void setCountryName(String countryName)
	{
		this.countryName = countryName ;
	}
	@ManyToOne(cascade = CascadeType.ALL)
	public Continent getContinent() {
		return continent;
	}
	public void setContinent(Continent continent) {
		this.continent = continent;
	}
	@Column(name="abbreviation")
	public String getAbbreviation() {
		return abbreviation;
	}
	public void setAbbreviation(String abbreviation) {
		this.abbreviation = abbreviation;
	}
}
